body {
    font-family: Arial, sans-serif;
    max-width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  .modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
  }

  .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 4px;
  }

  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }

  .close:hover {
    color: black;
  }

  .connection-info {
    margin-top: 15px;
    font-size: 14px;
  }

  .video-container {
    position: relative;
    width: 100%;
    height: 80vh;
    background: #000;
    overflow: hidden;
  }

  #remoteVideo {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #localVideo {
    position: absolute;
    width: 120px;
    height: 160px;
    right: 20px;
    bottom: 80px;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    object-fit: cover;
    touch-action: none;
    user-select: none;
  }

  .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }

  .button-group button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #07C160;
    color: white;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
  }

  .button-group button span.icon {
    font-size: 28px;
    margin-bottom: 5px;
  }

  .button-group button span.text {
    font-size: 12px;
  }

  .button-group button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #06AD56;
  }

  .button-group button:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .button-group button.toggle {
    background: #07C160;
  }

  .button-group button.toggle.off {
    background: #FA5151;
  }

  .button-group button:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }

  .control-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
  }

  .control-panel button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
  }

  .control-panel button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  }

  .control-panel button:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .control-panel button.toggle {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  }

  .control-panel button.toggle.off {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
  }

  .control-panel button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
  }

  .control-panel button:hover::before {
    opacity: 1;
  }

  .control-panel button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.5);
    opacity: 0;
    border-radius: 50%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
  }

  .control-panel button:focus:not(:active)::after {
    animation: ripple 1s ease-out;
  }

  @keyframes ripple {
    0% {
      transform: scale(0, 0);
      opacity: 0.5;
    }
    20% {
      transform: scale(25, 25);
      opacity: 0.3;
    }
    100% {
      opacity: 0;
      transform: scale(40, 40);
    }
  }

  button:disabled {
    background: #cccccc;
    cursor: not-allowed;
  }

  button.toggle {
    background: #34a853;
  }

  button.toggle.off {
    background: #ea4335;
  }

  #log {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
    background: #f5f5f5;
  }

  .remote-status,
  .network-status {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    justify-content: center;
  }

  .status-indicator {
    padding: 8px 12px;
    border-radius: 4px;
    background: #f0f0f0;
    font-size: 14px;
  }

  .signal-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
  }

  .signal-excellent {
    color: #34a853;
  }

  .signal-good {
    color: #fbbc05;
  }

  .signal-fair {
    color: #f29900;
  }

  .signal-poor {
    color: #ea4335;
  }

  @media (min-width: 768px) {
    .video-container {
      flex-direction: row;
      justify-content: center;
    }
  }